<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" /> 
<title><?php echo ($title); ?></title>
<link href="__CSS_MOBILE_PATH__/style.css" type="text/css" rel="stylesheet" />
<script src="__JS_PATH__/jquery-1.8.3.js" type="text/javascript"></script>
</head>
<body>
<div id="ly_banner">
    <a href="javasctipt:void(0);"><img src="<?php echo ($info["img"]); ?>" onerror="javascript:this.src='<?php echo ($houseLogo); ?>';" /><h2>菜单详情</h2></a>
</div>

<div style=" width:100%; position:absolute; padding:20px 0 75px; background-color:#FEFEF2;background:url(__IMG_MOBILE_PATH__/body_bg.jpg);">

    <div id="ly_xxy">
       <h2><?php echo ($info["name"]); ?></h2>
       <h3>所在分类：<?php echo ($info["floorName"]); ?>&nbsp;&nbsp;更新时间：<?php if($info['updatetime']): echo (todate($info["updatetime"])); else: echo (todate($info["createtime"])); endif; ?></h3>
       <div class="xxy_main">
	   	   <?php if($info['img']): ?><h4><img src="<?php echo ($info["img"]); ?>" /></h4><?php endif; ?>
           <p><?php echo ($info["content"]); ?></p>
           <div class="xxy_btom">
               <span>￥<?php echo ($info["price"]); ?>元</span>
               <span><a href="javascript:void(0);" onclick="addMenu('<?php echo ($info["id"]); ?>');">点餐</a></span>
               <div style="clear:both;"></div>
           </div>
       </div>
    </div>
    
</div>
  <div id="ly_foot">
	<ul>
		<li><a href="javascript:history.go(-1);"><img src="__IMG_MOBILE_PATH__/b_1.png" width="25" height="25" />返回</a></li>
		<li><a class="footerNav" data-type="menu" tabid="<?php echo ($tabId); ?>" href="javascript:void(0);"><img src="__IMG_MOBILE_PATH__/b_2.png" width="25" height="25" />菜单</a></li>
		<li><a href="/index.php?g=User&m=Mobile&a=recommend"><img src="__IMG_MOBILE_PATH__/b_3.png" width="25" height="25" />推荐</a></li>
		<li><a href="/index.php?g=User&m=Mobile&a=hotMenu"><img src="__IMG_MOBILE_PATH__/b_4.png" width="25" height="25" />热门</a></li>
        <li><a class="footerNav" data-type="already" href="javascript:void(0);"><img src="__IMG_MOBILE_PATH__/b_5.png" width="25" height="25" />已点</a></li>
	</ul>
</div>
<script>
//点菜按钮触发	added by Tony
function addMenu(menuId){
	if(menuId){
		$.post('index.php/User/Mobile/addMenu/',{'u_id':menuId},function(data){
			if(data.status==1){
				alert('点菜成功！');
			}else{
				alert('操作失败！');
			}
		},'json');
	}
}
//脚部菜单绑定事件	added by Tony
$('.footerNav').click(function(){
	var dataType = $(this).attr('data-type');
	if(dataType == 'menu'){
		var tabId = $(this).attr('tabid');
		if(tabId){
			window.location.href="/index.php?g=User&m=Mobile&a=classify&tabid="+tabId;
		}else{
			if(confirm('请您选择桌位')){
				window.location.href="/index.php?g=User&m=Mobile&a=index";
			}
		}
	}else if(dataType =='already'){
		window.location.href="/index.php?g=User&m=Mobile&a=already";
	}
});
</script>
</body>
</html>